package org.seedltd.upms.model.sys.form;

import java.util.Set;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.seedltd.core.validation.Save;
import org.seedltd.core.validation.Update;
import org.seedltd.upms.enums.EnableStatus;

import lombok.Getter;
import lombok.Setter;

/**
 * 角色管理表单
 *
 * @author laizuan
 * @version 1.0
 * @since 2021/07/19
 */
@Getter
@Setter
public class SysRoleForm {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {Update.class})
    private Long roleId;

    /**
     * 角色名称
     */
    @Length(message = "角色名称长度不能超过15个字符", max = 15, groups = {Save.class})
    @NotBlank(message = "角色名称不能为空", groups = {Save.class})
    private String roleName;

    /**
     * 角色代码
     */
    @Length(message = "角色代码长度不能超过25个字符", max = 25, groups = {Save.class})
    @NotBlank(message = "角色代码不能为空", groups = {Save.class})
    private String roleCode;

    /**
     * 启用状态(1启用 0禁用)
     */
    @NotNull(message = "启用状态不能为空", groups = {Save.class})
    private EnableStatus enabled;

    /**
     * 备注
     */
    @Length(message = "备注长度不能超过100个字符", max = 100, groups = {Save.class})
    @NotBlank(message = "备注不能为空", groups = {Save.class})
    private String remark;

    /**
     * 菜单主键
     */
    private Set<Long> menuIdList;
}
